package com.twu.biblioteca.models;

/**
 * Created with IntelliJ IDEA.
 * User: arvind
 * Date: 27/9/13
 * Time: 1:32 PM
 * To change this template use File | Settings | File Templates.
 */
public class Movie {
    private String name;
    private int year;
    private String director;
    private String rating;


    public Movie(String name,int year,String director,String rating)
    {
        setName(name);
        setYear(year);
        setDirector(director);
        setRating(rating);
    }
    public String getName() {
        return name;
    }

    private void setName(String name) {
        this.name = name;
    }

    public int getYear() {
        return year;
    }

    private void setYear(int year) {
        this.year = year;
    }

    public String getDirector() {
        return director;
    }

    private void setDirector(String director) {
        this.director = director;
    }

    public String getRating() {
        return rating;
    }

    private void setRating(String rating) {
        this.rating = rating;
    }

    public String getMovieDetails()
    {
        StringBuffer response=new StringBuffer();
        response.append(getName()+"\t");
        response.append(getYear()+"\t");
        response.append(getDirector()+"\t");
        response.append(getRating()+"\n");

        return response.toString();
    }
}
